#include "stdafx.h"
#include "RSKEY.h"

typedef BOOL (*TYPE_pInstallRsKeyHook)();
typedef void (*TYPE_pUnInstallRsKeyHook)();

RSKEY::RSKEY(void)
{
	hdll = LoadLibrary("RsKeyHook.dll"); 

	if (!hdll) 
		return ;

	TYPE_pInstallRsKeyHook p= (TYPE_pInstallRsKeyHook)GetProcAddress(hdll,"InstallRsKeyHook");
	p();
}

RSKEY::~RSKEY(void)
{
	if(hdll!=NULL)
	{
		TYPE_pUnInstallRsKeyHook p= 
			(TYPE_pUnInstallRsKeyHook)GetProcAddress(hdll,"UnInstallRsKeyHook");
		p();
		FreeLibrary(hdll);
	}
}
